﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Controls.Primitives;
using System.Collections.Generic;

namespace CityLife
{
	public partial class ToolBox : UserControl
	{
        BudgetWindow BudgetWindow;
		public ToolBox()
		{
			// Required to initialize variables
			InitializeComponent();
			
			EditBudget.Click+=new System.Windows.RoutedEventHandler(EditBudget_Click);

            ResidentialList.AddDesign(new R1D1());
    

            ResidentialList.AddDesign(new R2D1());
            ResidentialList.AddDesign(new Residential3());

            CommercialList.AddDesign(new Commercial1());
            CommercialList.AddDesign(new Commercial2());
            CommercialList.AddDesign(new Commercial3());

            IndustrialList.AddDesign(new Industrial1());
            IndustrialList.AddDesign(new Industrial2());
            IndustrialList.AddDesign(new Industrial3());

            HealthCareList.AddDesign(new HealthCare1());
            HealthCareList.AddDesign(new HealthCare2());
            HealthCareList.AddDesign(new HealthCare3());


            EnergyList.AddDesign(new Energy1());
            EnergyList.AddDesign(new Energy2());
            EnergyList.AddDesign(new Energy3());


            WasteList.AddDesign(new Waste1());
            WasteList.AddDesign(new Waste2());
            WasteList.AddDesign(new Waste3());

            EducationList.AddDesign(new Education1());
            EducationList.AddDesign(new Education2());
            EducationList.AddDesign(new Education3());

                 PoliceList.AddDesign(new Police1());
                 PoliceList.AddDesign(new Police2());
                 PoliceList.AddDesign(new Police3());

  

            Road1List.AddDesign(new Road1I());
        

 
    

		}

    
 

	 


        private void Destroy_Checked(object sender, System.Windows.RoutedEventArgs e)
		{

            ICityDesign empty = new Empty();
            MainPage.Editor.ActiveTool.Design = empty.Info.DesignType;
            MainPage.Editor.ActiveTool.info = empty.Info;
            MainPage.Editor.ActiveTool.ToolType = CityEditor.Tools.Destroy;
 
		}
        


		private void EditBudget_Click(object sender, System.Windows.RoutedEventArgs e)
		{
            if (BudgetWindow == null)
            {
                BudgetWindow = new BudgetWindow();
                BudgetWindow.Width = 400;
                BudgetWindow.Height = 400;
                BudgetWindow.HorizontalAlignment = HorizontalAlignment.Center;
                BudgetWindow.VerticalAlignment = VerticalAlignment.Center;
            }
            BudgetWindow.Title = "City budget";
            BudgetWindow.HorizontalOffset = (double)App.Current.Host.Content.ActualWidth / 2d - BudgetWindow.Width/2;
            BudgetWindow.VerticalOffset = (double)App.Current.Host.Content.ActualHeight / 2d - BudgetWindow.Height / 2; ;
            BudgetWindow.Show();
           
		}

        


 
     


        



          






      
        
	}
}